#include "BulletSoftBody/BulletReducedDeformableBody/btReducedDeformableBody.h"
#ifdef __cplusplus
extern "C" {
#endif
btReducedDeformableBody* bullet_NewbtReducedDeformableBody(btSoftBodyWorldInfo* worldInfo,int node_count,btVector3* x,double* m){
	btSoftBodyWorldInfo * c_arg_worldInfo=(btSoftBodyWorldInfo *)(void*)(worldInfo);
	int c_arg_node_count=node_count;
	btVector3 const * c_arg_x=(btVector3 const *)(void*)(x);
	btScalar const * c_arg_m=(btScalar const *)(void*)(m);
	btReducedDeformableBody* wrap_out = new btReducedDeformableBody(c_arg_worldInfo,c_arg_node_count,c_arg_x,c_arg_m);
	return wrap_out;
}

void bullet_btReducedDeformableBody_applyCentralImpulse(btReducedDeformableBody* c_this,btVector3* impulse){
	btVector3 const& c_arg_impulse=(btVector3 const&)(*impulse);
	c_this->applyCentralImpulse(c_arg_impulse);
}

void bullet_btReducedDeformableBody_applyDamping(btReducedDeformableBody* c_this,double timeStep){
	btScalar c_arg_timeStep=timeStep;
	c_this->applyDamping(c_arg_timeStep);
}

void bullet_btReducedDeformableBody_applyFullSpaceNodalForce(btReducedDeformableBody* c_this,btVector3* f_ext,int n_node){
	btVector3 const& c_arg_f_ext=(btVector3 const&)(*f_ext);
	int c_arg_n_node=n_node;
	c_this->applyFullSpaceNodalForce(c_arg_f_ext,c_arg_n_node);
}

void bullet_btReducedDeformableBody_applyInternalVelocityChanges(btReducedDeformableBody* c_this){
	c_this->applyInternalVelocityChanges();
}

void bullet_btReducedDeformableBody_applyRigidGravity(btReducedDeformableBody* c_this,btVector3* gravity,double dt){
	btVector3 const& c_arg_gravity=(btVector3 const&)(*gravity);
	btScalar c_arg_dt=dt;
	c_this->applyRigidGravity(c_arg_gravity,c_arg_dt);
}

void bullet_btReducedDeformableBody_applyTorqueImpulse(btReducedDeformableBody* c_this,btVector3* torque){
	btVector3 const& c_arg_torque=(btVector3 const&)(*torque);
	c_this->applyTorqueImpulse(c_arg_torque);
}

btVector3* bullet_btReducedDeformableBody_computeNodeFullVelocity(btReducedDeformableBody* c_this,btTransform* ref_trans,int n_node){
	btTransform const& c_arg_ref_trans=(btTransform const&)(*ref_trans);
	int c_arg_n_node=n_node;
	btVector3 const c_out = c_this->computeNodeFullVelocity(c_arg_ref_trans,c_arg_n_node);
	btVector3* wrap_out = new btVector3(c_out);
	return wrap_out;
}

btVector3* bullet_btReducedDeformableBody_computeTotalAngularMomentum(btReducedDeformableBody* c_this){
	btVector3 const c_out = c_this->computeTotalAngularMomentum();
	btVector3* wrap_out = new btVector3(c_out);
	return wrap_out;
}

void bullet_btReducedDeformableBody_disableReducedModes(btReducedDeformableBody* c_this,bool rigid_only){
	bool const c_arg_rigid_only=rigid_only;
	c_this->disableReducedModes(c_arg_rigid_only);
}

void bullet_btReducedDeformableBody_endOfTimeStepZeroing(btReducedDeformableBody* c_this){
	c_this->endOfTimeStepZeroing();
}

btVector3* bullet_btReducedDeformableBody_getAngularVelocity(btReducedDeformableBody* c_this){
	btVector3 const& c_out = c_this->getAngularVelocity();
	btVector3* wrap_out = (btVector3*)(&c_out);
	return wrap_out;
}

int bullet_btReducedDeformableBody_GetFieldOfM_nFull(btReducedDeformableBody* c_this){
	return (int)(c_this->m_nFull);
}

int bullet_btReducedDeformableBody_GetFieldOfM_nodeIndexOffset(btReducedDeformableBody* c_this){
	return (int)(c_this->m_nodeIndexOffset);
}

int bullet_btReducedDeformableBody_GetFieldOfM_nReduced(btReducedDeformableBody* c_this){
	return (int)(c_this->m_nReduced);
}

btVector3* bullet_btReducedDeformableBody_getLinearVelocity(btReducedDeformableBody* c_this){
	btVector3 const& c_out = c_this->getLinearVelocity();
	btVector3* wrap_out = (btVector3*)(&c_out);
	return wrap_out;
}

btVector3* bullet_btReducedDeformableBody_getRelativePos(btReducedDeformableBody* c_this,int n_node){
	int c_arg_n_node=n_node;
	btVector3 c_out = c_this->getRelativePos(c_arg_n_node);
	btVector3* wrap_out = new btVector3(c_out);
	return wrap_out;
}

double bullet_btReducedDeformableBody_getTotalMass(btReducedDeformableBody* c_this){
	btScalar c_out = c_this->getTotalMass();
	double wrap_out = (c_out);
	return wrap_out;
}

void bullet_btReducedDeformableBody_internalApplyFullSpaceImpulse(btReducedDeformableBody* c_this,btVector3* impulse,btVector3* rel_pos,int n_node,double dt){
	btVector3 const& c_arg_impulse=(btVector3 const&)(*impulse);
	btVector3 const& c_arg_rel_pos=(btVector3 const&)(*rel_pos);
	int c_arg_n_node=n_node;
	btScalar c_arg_dt=dt;
	c_this->internalApplyFullSpaceImpulse(c_arg_impulse,c_arg_rel_pos,c_arg_n_node,c_arg_dt);
}

void bullet_btReducedDeformableBody_internalApplyRigidImpulse(btReducedDeformableBody* c_this,btVector3* impulse,btVector3* rel_pos){
	btVector3 const& c_arg_impulse=(btVector3 const&)(*impulse);
	btVector3 const& c_arg_rel_pos=(btVector3 const&)(*rel_pos);
	c_this->internalApplyRigidImpulse(c_arg_impulse,c_arg_rel_pos);
}

btVector3* bullet_btReducedDeformableBody_internalComputeNodeDeltaVelocity(btReducedDeformableBody* c_this,btTransform* ref_trans,int n_node){
	btTransform const& c_arg_ref_trans=(btTransform const&)(*ref_trans);
	int c_arg_n_node=n_node;
	btVector3 const c_out = c_this->internalComputeNodeDeltaVelocity(c_arg_ref_trans,c_arg_n_node);
	btVector3* wrap_out = new btVector3(c_out);
	return wrap_out;
}

void bullet_btReducedDeformableBody_internalInitialization(btReducedDeformableBody* c_this){
	c_this->internalInitialization();
}

bool bullet_btReducedDeformableBody_isReducedModesOFF(btReducedDeformableBody* c_this){
	bool c_out = c_this->isReducedModesOFF();
	bool wrap_out = (c_out);
	return wrap_out;
}

void bullet_btReducedDeformableBody_mapToFullPosition(btReducedDeformableBody* c_this,btTransform* ref_trans){
	btTransform const& c_arg_ref_trans=(btTransform const&)(*ref_trans);
	c_this->mapToFullPosition(c_arg_ref_trans);
}

void bullet_btReducedDeformableBody_mapToFullVelocity(btReducedDeformableBody* c_this,btTransform* ref_trans){
	btTransform const& c_arg_ref_trans=(btTransform const&)(*ref_trans);
	c_this->mapToFullVelocity(c_arg_ref_trans);
}

void bullet_btReducedDeformableBody_predictIntegratedTransform(btReducedDeformableBody* c_this,double dt,btTransform* predictedTransform){
	btScalar c_arg_dt=dt;
	btTransform& c_arg_predictedTransform=(btTransform&)(*predictedTransform);
	c_this->predictIntegratedTransform(c_arg_dt,c_arg_predictedTransform);
}

void bullet_btReducedDeformableBody_proceedToTransform(btReducedDeformableBody* c_this,double dt,bool end_of_time_step){
	btScalar c_arg_dt=dt;
	bool c_arg_end_of_time_step=end_of_time_step;
	c_this->proceedToTransform(c_arg_dt,c_arg_end_of_time_step);
}

void bullet_btReducedDeformableBody_setDamping(btReducedDeformableBody* c_this,double alpha,double beta){
	btScalar const c_arg_alpha=alpha;
	btScalar const c_arg_beta=beta;
	c_this->setDamping(c_arg_alpha,c_arg_beta);
}

void bullet_btReducedDeformableBody_setFixedNodes(btReducedDeformableBody* c_this,int n_node){
	int const c_arg_n_node=n_node;
	c_this->setFixedNodes(c_arg_n_node);
}

void bullet_btReducedDeformableBody_setInertiaProps(btReducedDeformableBody* c_this){
	c_this->setInertiaProps();
}

void bullet_btReducedDeformableBody_setMassScale(btReducedDeformableBody* c_this,double rho){
	btScalar const c_arg_rho=rho;
	c_this->setMassScale(c_arg_rho);
}

void bullet_btReducedDeformableBody_setReducedModes(btReducedDeformableBody* c_this,int num_modes,int full_size){
	int c_arg_num_modes=num_modes;
	int c_arg_full_size=full_size;
	c_this->setReducedModes(c_arg_num_modes,c_arg_full_size);
}

void bullet_btReducedDeformableBody_setRigidAngularVelocity(btReducedDeformableBody* c_this,btVector3* omega){
	btVector3 const& c_arg_omega=(btVector3 const&)(*omega);
	c_this->setRigidAngularVelocity(c_arg_omega);
}

void bullet_btReducedDeformableBody_setRigidVelocity(btReducedDeformableBody* c_this,btVector3* v){
	btVector3 const& c_arg_v=(btVector3 const&)(*v);
	c_this->setRigidVelocity(c_arg_v);
}

void bullet_btReducedDeformableBody_setStiffnessScale(btReducedDeformableBody* c_this,double ks){
	btScalar const c_arg_ks=ks;
	c_this->setStiffnessScale(c_arg_ks);
}

void bullet_btReducedDeformableBody_updateExternalForceProjectMatrix(btReducedDeformableBody* c_this,bool initialized){
	bool c_arg_initialized=initialized;
	c_this->updateExternalForceProjectMatrix(c_arg_initialized);
}

void bullet_btReducedDeformableBody_updateLocalMomentArm(btReducedDeformableBody* c_this){
	c_this->updateLocalMomentArm();
}

void bullet_btReducedDeformableBody_updateReducedDofs(btReducedDeformableBody* c_this,double solverdt){
	btScalar c_arg_solverdt=solverdt;
	c_this->updateReducedDofs(c_arg_solverdt);
}

void bullet_btReducedDeformableBody_updateReducedVelocity(btReducedDeformableBody* c_this,double solverdt){
	btScalar c_arg_solverdt=solverdt;
	c_this->updateReducedVelocity(c_arg_solverdt);
}

#ifdef __cplusplus
}
#endif
